import {
	createStore
} from 'vuex'

const store = createStore({
	state: {
		devAddress: uni.getStorageSync('devAddress') ? uni.getStorageSync('devAddress') : '',
		befurl: 'https://www.jumpvip.vip',
		language: uni.getStorageSync('language') ? uni.getStorageSync('language') : '',
	},
	mutations: {
		SET_devAddress: (state, devAddress) => {
			state.devAddress = devAddress
			uni.setStorageSync('devAddress', devAddress);
		},
		changeLanguage: (state, language) => {
			state.language = language
			uni.setStorageSync('language', language);
		},
	},
	actions: {},
	getters: {
		// 获取数据
		getdeviceGetDevice(state) {
			uni.getStorageSync('deviceGetDevice')
			return state.deviceGetDevice;
		},
	},
	// ....
})

export default store;